package com.mc.service.impl;

import com.mc.bean.College;
import com.mc.dao.CollegeDao;
import com.mc.dao.Impl.CollegeDaoImpl;
import com.mc.service.CollegeService;

import java.util.List;

/**
 * @Description 学院数据业务逻辑实现类
 * @author fyp
 */
public class CollegeServiceImpl implements CollegeService {

    CollegeDao collegeDao=new CollegeDaoImpl();

    @Override
    public List<College> findAll() {

        return collegeDao.findAll();
    }

    @Override
    public College findById(int colid) {

        return collegeDao.findById(colid);
    }

    @Override
    public boolean add(College college) {

        return collegeDao.add(college)>0?true:false;
    }

    @Override
    public boolean delete(int colid) {

        return collegeDao.delete(colid)>0?true:false;
    }

    @Override
    public boolean update(College college) {

        return collegeDao.update(college)>0?true:false;
    }
}
